package com.bdmc.car.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bdmc.common.convert.LocalDateConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

;

/**
 * 维修信息视图对象 car_maintenance
 *
 * @author bdmc
 * @date 2023-01-06
 */
@Data
@ExcelIgnoreUnannotated
public class CarMaintenanceVo {

	private static final long serialVersionUID = 1L;

	/**
	 * 维修信息id
	 */
	@ExcelProperty(value = "维修信息id")
	private Integer maintenanceId;

	/**
	 * 维修报备人
	 */
	@ExcelProperty(value = "维修报备人")
	private String reporter;

	/**
	 * 车辆id
	 */
	@ExcelProperty(value = "车辆id")
	private Integer carId;

	/**
	 * 维修送达时间
	 */
	@ExcelProperty(value = "维修送达时间",converter = LocalDateConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate deliveryTime;

	/**
	 * 维修完成时间
	 */
	@ExcelProperty(value = "维修完成时间",converter = LocalDateConverter.class)
	@JsonFormat(pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private LocalDate finishTime;

	/**
	 * 总金额
	 */
	@ExcelProperty(value = "总金额")
	private BigDecimal totalAmount;

	/**
	 * 修车厂id
	 */
	private Integer garageId;

	/**
	 * 维修信息录入人
	 */
	@ExcelProperty(value = "维修信息录入人")
	private String enterBy;

	/**
	 * 维修单照片
	 */
	@ExcelProperty(value = "维修单照片")
	private String photoList;


	@ExcelProperty(value = "车牌")
	private String carNum;

	@ExcelProperty(value = "修车厂")
	private String garageName;

	//车辆维修详单
	private List<CarMaintenanceDetailVo> carMaintenanceDetailList;
}
